package date;

import java.text.ParseException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class TestM {
    public static void main(String[] args) throws ParseException {

        long startTime = System.currentTimeMillis();

        //解析日期
        String dateStr= "2016-10-25 12:12:12";
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime date= LocalDateTime.parse(dateStr, formatter);
        LocalDate date1 = LocalDate.parse(dateStr, formatter);
        LocalTime date2 = LocalTime.parse(dateStr, formatter);

        System.out.println(date.toString());
        System.out.println(date1.toString());
        System.out.println(date2.toString());

        System.out.println(DateFUtils.formatter2("2018-10-25 12:12:12"));

        long endTime = System.currentTimeMillis();

        System.out.println("开始："+ startTime + " \n结束: " + endTime + "\n耗时："+(endTime - startTime));


    }

}
